<?php
    namespace app\admin\validate;
    use think\Validate;
    class Cat extends Validate{
        protected $rule=[
            'name' =>'chs',
            'desc' => 'require|number',
        ];
        protected $message=[
            'name.chs' => '产品名称只能由汉字',
            'desc.require' => '排序不能为空',
            'desc.number' => '排序必须是数字',
        ];
        protected $scene = [
            'check_phone' => ['phone']
        ];
    }

?>